@import '@/styles/utils.scss';

.pageCont {
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.form {
  margin-bottom: 24px;
}

.title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #151515;
  
  :global(.dark) & {
    color: #f5f5f5;
  }
}

.button {
  background-color: #0056b3;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  
  &:hover {
    background-color: #004494;
  }
  
  &:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
  }
  
  :global(.dark) & {
    background-color: #3a86ff;
    
    &:hover {
      background-color: #2a76ef;
    }
    
    &:disabled {
      background-color: #444444;
    }
  }
}

.resultContainer {
  margin-top: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 15px;
  background-color: #f9f9f9;
  max-height: 300px;
  overflow-y: auto;
  
  pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #333333;
  }
  
  :global(.dark) & {
    background-color: #2a2a2a;
    border-color: #444444;
    
    pre {
      color: #e5e7eb;
    }
  }
}

.errorContainer {
  margin-top: 20px;
  border: 1px solid #ffcccc;
  border-radius: 4px;
  padding: 15px;
  background-color: #fff8f8;
  max-height: 300px;
  overflow-y: auto;
  
  .errorTitle {
    color: #d32f2f;
    margin-bottom: 10px;
    font-weight: bold;
  }
  
  pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #d32f2f;
  }
  
  :global(.dark) & {
    background-color: #3a2222;
    border-color: #662222;
    
    .errorTitle {
      color: #ff6b6b;
    }
    
    pre {
      color: #ff6b6b;
    }
  }
}

.formField {
  margin-bottom: 20px;
}

.formLabel {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333333;
  
  :global(.dark) & {
    color: #e5e7eb;
  }
}

.textareaWrapper {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  background-color: white;
  
  &:focus-within {
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  }
  
  :global(.dark) & {
    background-color: #2a2a2a;
    border-color: #444444;
    
    &:focus-within {
      border-color: #3a86ff;
      box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.25);
    }
  }
}

.textarea {
  width: 100%;
  padding: 12px;
  border: none;
  outline: none;
  resize: none;
  font-family: monospace;
  font-size: 14px;
  background-color: transparent;
  color: #333333;
  
  &::placeholder {
    color: #aaaaaa;
  }
  
  :global(.dark) & {
    color: #e5e7eb;
    
    &::placeholder {
      color: #777777;
    }
  }
}

.resultTitle {
  margin-bottom: 10px;
  font-weight: bold;
  color: #333333;
  
  :global(.dark) & {
    color: #e5e7eb;
  }
}

.code{
  margin-top: 20px;
  iframe {
    width: 100%;
    height: 800px;
    border: none;
  }
}